/ Redmine Config
- redmine_has_rw_access_on_all_repos = RedmineGitHosting::Config.get_setting(:redmine_has_rw_access_on_all_repos, true)
- all_projects_use_git               = RedmineGitHosting::Config.get_setting(:all_projects_use_git, true)
- init_repositories_on_create        = RedmineGitHosting::Config.get_setting(:init_repositories_on_create, true)
- delete_git_repositories            = RedmineGitHosting::Config.get_setting(:delete_git_repositories, true)
- hierarchical_organisation          = RedmineGitHosting::Config.get_setting(:hierarchical_organisation, true)

%h3= l(:label_redmine_config)

%p
  %label= l(:label_redmine_has_rw_access_on_all_repos)
  = bootstrap_switch_tag do
    = hidden_field_tag 'settings[redmine_has_rw_access_on_all_repos]', 'false'
    = check_box_tag 'settings[redmine_has_rw_access_on_all_repos]', redmine_has_rw_access_on_all_repos, redmine_has_rw_access_on_all_repos

%p
  %label= l(:label_all_projects_use_git)
  = bootstrap_switch_tag do
    = hidden_field_tag 'settings[all_projects_use_git]', 'false'
    = check_box_tag 'settings[all_projects_use_git]', all_projects_use_git, all_projects_use_git

%p
  %label= l(:label_init_repositories_on_create).html_safe
  = bootstrap_switch_tag do
    = hidden_field_tag 'settings[init_repositories_on_create]', 'false'
    = check_box_tag 'settings[init_repositories_on_create]', init_repositories_on_create, init_repositories_on_create, {:disabled => !all_projects_use_git}

%p
  %label= l(:label_delete_git_repositories).html_safe
  = bootstrap_switch_tag do
    = hidden_field_tag 'settings[delete_git_repositories]', 'false'
    = check_box_tag 'settings[delete_git_repositories]', delete_git_repositories, delete_git_repositories

%p
  %label= l(:label_hierarchical_organisation)
  = bootstrap_switch_tag(class: 'switch-extended', data: { 'on-label' => l(:label_hierarchical), 'off-label' => l(:label_flat) }) do
    = hidden_field_tag 'settings[hierarchical_organisation]', 'false'
    = check_box_tag 'settings[hierarchical_organisation]', hierarchical_organisation, hierarchical_organisation

%br

= render 'settings/redmine_git_hosting/gitolite_display_access'
